# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=dosbox-staging
pkgver=0.81.2
pkgrel=0
pkgdesc="revitalized dosbox DOS-emulator"
url="https://dosbox-staging.github.io/"
arch="all !x86" # TEXTREL on x86
license="GPL-2.0-or-later"
options="!check" # no test
provides="dosbox"
replaces="dosbox"
makedepends="
	cmake
	meson
	alsa-lib-dev
	fluidsynth-dev
	iir1-dev
	libpng-dev
	libslirp-dev
	opus-dev
	opusfile-dev
	speexdsp-dev
	sdl2-dev
	sdl2_image-dev
	sdl2_net-dev
	zlib-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dosbox-staging/dosbox-staging/archive/v$pkgver.tar.gz"

build() {
	abuild-meson \
	--prefix /usr \
	--buildtype=minsize \
	-Duse_mt32emu=false \
	-Duse_zlib_ng=false \
	-Ddefault_library=shared \
	. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
1651d04db7a5c6a6fbff604d762619807e2446bc074dba1fca1d46bd36aead0452dcab73ba8ae4d93c285b3a4b95c1c16a14ccb3b855abd5853b90f5e6040ed9  dosbox-staging-0.81.2.tar.gz
"
